<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
</head>
<body>

    <div></div>

<script>
    const box = document.querySelector("div")

    box.style.width = "200px"
    box.style.height = "300px"
    box.style.backgroundColor = "red"

    // 生成的是行内样式，优先级最高
</script>
    
</body>
</html>